﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace EnvironmentManagerSystem.A
{
    public partial class ShenPiZaiShen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        #region 按钮(搜索按钮、重置按钮)(x)
        //搜索按钮
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (Convert.ToDateTime(TextBox1.Text) > Convert.ToDateTime(TextBox2.Text))
                Response.Write("<script language='javascript'>alert('起始时间不能大于结束时间！');</script>");
            else
            {
                if (TextBox1.Text == "" && TextBox2.Text != "")
                    Response.Write("<script language='javascript'>alert('请填写要查询的受理起始时间！');</script>");
                else if (TextBox1.Text != "" && TextBox2.Text == "")
                    Response.Write("<script language='javascript'>alert('请填写要查询的受理结束时间！');</script>");
                else
                {
                    string url;
                    url = "ShenPiZaiShens.aspx?ShouLi1=" + TextBox1.Text + "&ShouLi2=" + TextBox2.Text;
                    Response.Redirect(url);
                }
            }
        }
        //重置按钮
        protected void Button2_Click(object sender, EventArgs e)
        {
            foreach (Control con in this.form1.Controls)
            {
                if (con is TextBox)
                    ((TextBox)con).Text = string.Empty;
            }
        }
        #endregion
    }
}
